<?php

/**
 * Local variables
 * @var \Phalcon\Mvc\View\Engine $this
 */

?>
<?php echo $this->getContent() ?>

<h1>Edit Controllers</h1>

<table class="table table-bordered table-striped">
	<thead>
		<tr>
			<td><b>Name</b></td>
			<td><b>Size</b></td>
			<td></td>
		</tr>
	</thead>
	<tbody>
	<?php
		$iterator = new DirectoryIterator($controllersDir);
		foreach($iterator as $fileinfo){
			if(!$fileinfo->isDot()){
				echo '<tr>
					<td>', $fileinfo->getFileName(), '</td>
					<td>', $fileinfo->getSize(), '</td>
					<td><a href="', $this->url->get("webtools.php?_url=/controllers/edit/".$fileinfo->getFileName()), '"
					    class"="btn">Edit</a></td>
				</tr>';
			}
		}
	?>
	</tbody>
</table>
